package pong.app.controllers
{
	import flash.display.DisplayObjectContainer;
	import flash.errors.IllegalOperationError;
	
	import pong.app.IPongAppState;
	import pong.app.IPongAppStateContext;
	import pong.app.IPongAppView;

	public class PongAppMenuState implements IPongAppState
	{
		private var _stateContext:IPongAppStateContext;
		
		private var _view:IPongAppView;
		
		
		
		public function PongAppMenuState(stateContext:IPongAppStateContext, view:IPongAppView)
		{
			this._stateContext = stateContext;
			
			this._view = view;
		}
		
		
		public function showMenu():void 
		{
			// already in menu state, do nothing
		}
		
		public function showInstructions():void
		{
			throw new IllegalOperationError("Not implemented");
		}
		
		public function showLogin():void 
		{
			throw new IllegalOperationError("Not implemented");
		}
		
		public function showGame():void 
		{
			throw new IllegalOperationError("Not implemented");
		}
		
		public function showScores():void 
		{
			throw new IllegalOperationError("Not implemented");
		}
		
		
		
		
		
		public function enterState():void
		{
			this._view.show();
			
			this.addEvents();
		}
		
		
		
		private function addEvents():void
		{
			
		}
		
		
		
		public function exitState():void
		{
			this._view.hide();
			
			this.removeEvents();
		}
		
		
		
		private function removeEvents():void
		{
			
		}
		
		
		
		public function dispose():void
		{
			this.exitState();
		}
		
		
	}
}